# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=blackarch-installer
pkgver=1.2.24
pkgrel=1
pkgdesc='The official BlackArch Linux installer.'
arch=('any')
url='https://github.com/BlackArch/blackarch-installer'
license=('GPL3')
depends=('bash')
source=("https://github.com/BlackArch/$pkgname/archive/v$pkgver.tar.gz")
sha512sums=('17388a73bc809d56bc9dec909e9993d1e5aa93e13e17669922b15b47a8019595c85a33696177c5e07b1c3f3193e65360788d86d10707e1e6876f1e76ea417742')

package() {
  cd "$pkgname-$pkgver"

  install -dm 755 "$pkgdir/usr/bin/"
  install -dm 755 "$pkgdir/usr/share/$pkgname"

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" docs/* \
    README.md

  rm -rf docs README.md

  cp -a * "$pkgdir/usr/share/$pkgname/"

  chmod +x "$pkgdir/usr/share/$pkgname/blackarch-install"

  ln -s "/usr/share/$pkgname/blackarch-install" \
    "$pkgdir/usr/bin/blackarch-install"
}

